Skip to content

Commit fc0c0ef

Browse files
authored
Merge pull request #4 from ocramz/master
WIP (20) Linear regression example
2 parents 57fe378 + c1e7a5b commit fc0c0ef

File tree

3 files changed

+51
-157
lines changed

3 files changed

+51
-157
lines changed

Diff for: data-haskell-examples.cabal

+43-155
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,17 @@
1-
name:
2-
data-haskell-examples
3-
version:
4-
0.1.0.0
5-
synopsis:
6-
Data analysis examples
7-
description:
8-
A set of recommended Haskell libraries for data analysis and example usage.
9-
category:
10-
project
11-
homepage:
12-
https://github.com/DataHaskell/data-haskell-examples
13-
license:
14-
BSD3
15-
license-file:
16-
LICENSE
17-
author:
18-
Tony Day
19-
maintainer:
20-
21-
copyright:
22-
Tony Day
23-
build-type:
24-
Simple
25-
cabal-version:
26-
>=1.14
27-
extra-source-files:
28-
stack.yaml
1+
name: data-haskell-examples
2+
version: 0.1.0.0
3+
synopsis: Data analysis examples
4+
description: A set of recommended Haskell libraries for data analysis and example usage.
5+
category: project
6+
homepage: https://github.com/DataHaskell/data-haskell-examples
7+
license: BSD3
8+
license-file: LICENSE
9+
author: Tony Day
10+
maintainer: [email protected]
11+
copyright: Tony Day
12+
build-type: Simple
13+
cabal-version: >=1.14
14+
extra-source-files: stack.yaml
2915
library
3016
default-language:
3117
Haskell2010
@@ -37,145 +23,47 @@ library
3723
build-depends:
3824
base >= 4.7 && < 5
3925
default-extensions:
40-
NoImplicitPrelude,
41-
UnicodeSyntax,
42-
BangPatterns,
43-
BinaryLiterals,
44-
DeriveFoldable,
45-
DeriveFunctor,
46-
DeriveGeneric,
47-
DeriveTraversable,
48-
DisambiguateRecordFields,
49-
EmptyCase,
50-
FlexibleContexts,
51-
FlexibleInstances,
52-
FunctionalDependencies,
53-
GADTSyntax,
54-
InstanceSigs,
55-
KindSignatures,
56-
LambdaCase,
57-
MonadComprehensions,
58-
MultiParamTypeClasses,
59-
MultiWayIf,
60-
NegativeLiterals,
61-
OverloadedStrings,
62-
ParallelListComp,
63-
PartialTypeSignatures,
64-
PatternSynonyms,
65-
RankNTypes,
66-
RecordWildCards,
67-
RecursiveDo,
68-
ScopedTypeVariables,
69-
TupleSections,
70-
TypeFamilies,
71-
TypeOperators
26+
NoImplicitPrelude
7227

7328
test-suite data-haskell-examples-test
74-
type:
75-
exitcode-stdio-1.0
76-
default-language:
77-
Haskell2010
29+
type: exitcode-stdio-1.0
30+
default-language: Haskell2010
7831
ghc-options:
79-
-funbox-strict-fields
80-
-fforce-recomp
81-
-threaded
82-
-rtsopts
83-
-with-rtsopts=-N
84-
hs-source-dirs:
85-
test
86-
main-is:
87-
Spec.hs
32+
-funbox-strict-fields
33+
-- -fforce-recomp
34+
-- -threaded
35+
-- -rtsopts
36+
-with-rtsopts=-N
37+
hs-source-dirs: test
38+
main-is: Spec.hs
8839
build-depends:
89-
base >= 4.7 && < 5,
90-
protolude,
91-
data-haskell-examples,
92-
doctest
40+
base >= 4.7 && < 5,
41+
protolude,
42+
data-haskell-examples,
43+
doctest
9344
default-extensions:
94-
NoImplicitPrelude,
95-
UnicodeSyntax,
96-
BangPatterns,
97-
BinaryLiterals,
98-
DeriveFoldable,
99-
DeriveFunctor,
100-
DeriveGeneric,
101-
DeriveTraversable,
102-
DisambiguateRecordFields,
103-
EmptyCase,
104-
FlexibleContexts,
105-
FlexibleInstances,
106-
FunctionalDependencies,
107-
GADTSyntax,
108-
InstanceSigs,
109-
KindSignatures,
110-
LambdaCase,
111-
MonadComprehensions,
112-
MultiParamTypeClasses,
113-
MultiWayIf,
114-
NegativeLiterals,
115-
OverloadedStrings,
116-
ParallelListComp,
117-
PartialTypeSignatures,
118-
PatternSynonyms,
119-
RankNTypes,
120-
RecordWildCards,
121-
RecursiveDo,
122-
ScopedTypeVariables,
123-
TupleSections,
124-
TypeFamilies,
125-
TypeOperators
45+
NoImplicitPrelude
12646

12747
executable data-haskell-examples
12848
default-language:
12949
Haskell2010
13050
ghc-options:
131-
-funbox-strict-fields
132-
-fforce-recomp
133-
-threaded
134-
-rtsopts
135-
-with-rtsopts=-N
136-
hs-source-dirs:
137-
examples
138-
main-is:
139-
examples.hs
51+
-funbox-strict-fields
52+
-- -fforce-recomp
53+
-- -threaded
54+
-- -rtsopts
55+
-with-rtsopts=-N
56+
hs-source-dirs: examples
57+
main-is: examples.hs
58+
other-modules: LinearRegression1
14059
build-depends:
141-
base >= 4.7 && < 5,
142-
protolude,
143-
data-haskell-examples,
144-
vector,
145-
hmatrix
60+
base >= 4.7 && < 5,
61+
protolude,
62+
data-haskell-examples,
63+
vector,
64+
hmatrix
14665
default-extensions:
147-
NoImplicitPrelude,
148-
UnicodeSyntax,
149-
BangPatterns,
150-
BinaryLiterals,
151-
DeriveFoldable,
152-
DeriveFunctor,
153-
DeriveGeneric,
154-
DeriveTraversable,
155-
DisambiguateRecordFields,
156-
EmptyCase,
157-
FlexibleContexts,
158-
FlexibleInstances,
159-
FunctionalDependencies,
160-
GADTSyntax,
161-
InstanceSigs,
162-
KindSignatures,
163-
LambdaCase,
164-
MonadComprehensions,
165-
MultiParamTypeClasses,
166-
MultiWayIf,
167-
NegativeLiterals,
168-
OverloadedStrings,
169-
ParallelListComp,
170-
PartialTypeSignatures,
171-
PatternSynonyms,
172-
RankNTypes,
173-
RecordWildCards,
174-
RecursiveDo,
175-
ScopedTypeVariables,
176-
TupleSections,
177-
TypeFamilies,
178-
TypeOperators
66+
NoImplicitPrelude
17967

18068
source-repository head
18169
type:

Diff for: examples/LinearRegression1.hs

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{-# LANGUAGE NoImplicitPrelude #-}
2+
module LinearRegression1 where
3+
4+
import Protolude
5+
import Data.Vector as V
6+
import Numeric.LinearAlgebra as H

Diff for: stack.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# resolver:
1616
# name: custom-snapshot
1717
# location: "./custom-snapshot.yaml"
18-
resolver: lts-7.18
18+
resolver: lts-8.3
1919

2020
# User packages to be built.
2121
# Various formats can be used as shown in the example below.
@@ -63,4 +63,4 @@ extra-package-dbs: []
6363
# extra-lib-dirs: [/path/to/dir]
6464
#
6565
# Allow a newer minor version of GHC than the snapshot specifies
66-
# compiler-check: newer-minor
66+
# compiler-check: newer-minor

0 commit comments

Comments
 (0)