Compare commits

..

No commits in common. "b6c1c2722447019ad2eea2c11a114fa000cae54b" and "0f428bea1617d90c1bfd28292203ef4b1cc50a11" have entirely different histories.

7 changed files with 8 additions and 32 deletions

2
.gitignore vendored
View File

@ -1,5 +1,3 @@
/.ghc.environment.x86_64-linux-8.6.5 /.ghc.environment.x86_64-linux-8.6.5
dist-newstyle/ dist-newstyle/
.stack-work .stack-work
haga.prof
**.kate-swp

View File

@ -22,7 +22,6 @@ build-type: Simple
library library
build-depends: base build-depends: base
, cassava , cassava
, containers
, extra , extra
, MonadRandom , MonadRandom
, monad-loops , monad-loops
@ -45,12 +44,10 @@ library
, Seminar , Seminar
, Pretty , Pretty
, Szenario191 , Szenario191
, LambdaCalculus
executable haga executable haga
build-depends: base build-depends: base
, cassava , cassava
, containers
, extra , extra
, MonadRandom , MonadRandom
, monad-loops , monad-loops
@ -74,12 +71,10 @@ executable haga
, Seminar , Seminar
, Pretty , Pretty
, Szenario191 , Szenario191
, LambdaCalculus
executable haga-test executable haga-test
build-depends: base build-depends: base
, cassava , cassava
, containers
, Cabal , Cabal
, extra , extra
, MonadRandom , MonadRandom
@ -104,4 +99,3 @@ executable haga-test
, Seminar , Seminar
, Pretty , Pretty
, Szenario191 , Szenario191
, LambdaCalculus

View File

@ -19,7 +19,7 @@
-- In order to use it for a certain problem, basically, you have to make your -- In order to use it for a certain problem, basically, you have to make your
-- solution type an instance of 'Individual' and then simply call the 'run' -- solution type an instance of 'Individual' and then simply call the 'run'
-- function. -- function.
module GA ( Environment,new, population, mutate, crossover1,crossover, Evaluator, fitness, Individual, GA.run, tournament, N, R, Population, steps, bests, runTests) where module GA where
import Control.Arrow hiding (first, second) import Control.Arrow hiding (first, second)
import Data.List.NonEmpty ((<|)) import Data.List.NonEmpty ((<|))

View File

@ -11,8 +11,8 @@ import System.IO
import Szenario191 import Szenario191
data Options = Options data Options = Options
{ iterations :: !N, { iterations :: N,
populationSize :: !N populationSize :: N
} }
options :: Parser Options options :: Parser Options

View File

@ -1,29 +1,13 @@
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE NoImplicitPrelude #-}
module Main where module Main where
import qualified GA import qualified GA
import Protolude import Protolude
import qualified Seminar import qualified Seminar
import qualified LambdaCalculus
import Data.Typeable
import qualified Type.Reflection as Ref
main :: IO () main :: IO ()
main = do main = do
_ <- GA.runTests _ <- GA.runTests
_ <- Seminar.runTests _ <- Seminar.runTests
_ <- putStrLn $ ((show (typeRepArgs (Ref.SomeTypeRep (Ref.TypeRep @(Int->Int->Int->Text))))) :: Text)
_ <- putStrLn $ ((show (typeRepArgs (Ref.SomeTypeRep (Ref.TypeRep @(Text))))) :: Text)
_ <- putStrLn (LambdaCalculus.toLambdaExpressionShort LambdaCalculus.testIntToClassCorrect)
_ <- putStrLn $ ((show (LambdaCalculus.res 1)) :: Text)
_ <- putStrLn $ ((show (LambdaCalculus.res 2)) :: Text)
_ <- putStrLn $ ((show (LambdaCalculus.res 3)) :: Text)
return () return ()

View File

@ -17,7 +17,7 @@
# #
# resolver: ./custom-snapshot.yaml # resolver: ./custom-snapshot.yaml
# resolver: https://example.com/snapshots/2023-01-01.yaml # resolver: https://example.com/snapshots/2023-01-01.yaml
resolver: nightly-2024-02-11 resolver: lts-21.25
# User packages to be built. # User packages to be built.
# Various formats can be used as shown in the example below. # Various formats can be used as shown in the example below.

View File

@ -6,7 +6,7 @@
packages: [] packages: []
snapshots: snapshots:
- completed: - completed:
sha256: 3693cc17b3c739a22032b7c7bf44aa7ddbeef79311bb9f175e68372f92fc749b sha256: a81fb3877c4f9031e1325eb3935122e608d80715dc16b586eb11ddbff8671ecd
size: 600684 size: 640086
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2024/2/11.yaml url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/21/25.yaml
original: nightly-2024-02-11 original: lts-21.25