andrewthad / automata Goto Github PK
View Code? Open in Web Editor NEWDFA and NFA
License: BSD 3-Clause "New" or "Revised" License
DFA and NFA
License: BSD 3-Clause "New" or "Revised" License
the 's' is redundant/implied. also not having the module names end with all caps is a little strange to me (more strange to others to whom i've shown this library)
We need these for an implement implementation of DFA and NFA over large alphabets. This will allow us to represent a transition on a range of adjacent characters concisely.
i'm curious. also, your regex type definitely has both semiring and *-semiring instances.
Failed to build automata-0.1.0.0.
Build log (
/home/pree/.cabal/logs/ghc-8.10.7/automata-0.1.0.0-78001ed6925377853a262bba133116f0e49cdb40a7c0367777e9a5dc27a899c1.log
):
Configuring library for automata-0.1.0.0..
Preprocessing library for automata-0.1.0.0..
Building library for automata-0.1.0.0..
[1 of 7] Compiling Automata.Internal ( src/Automata/Internal.hs, dist/build/Automata/Internal.o, dist/build/Automata/Internal.dyn_o )
src/Automata/Internal.hs:136:14: error:
Not in scope: ‘C.replicateM’
Perhaps you meant one of these:
‘C.replicate’ (imported from Data.Primitive.Contiguous),
‘L.replicate’ (imported from Data.List)
Module ‘Data.Primitive.Contiguous’ does not export ‘replicateM’.
|
136 | m <- C.replicateM n3 placeholder
| ^^^^^^^^^^^^
src/Automata/Internal.hs:248:17: error:
Not in scope: ‘C.replicateM’
Perhaps you meant one of these:
‘C.replicate’ (imported from Data.Primitive.Contiguous),
‘L.replicate’ (imported from Data.List)
Module ‘Data.Primitive.Contiguous’ does not export ‘replicateM’.
|
248 | marr <- C.replicateM (M.size canonization) (error ("Automata.Nfsa.minimize: uninitialized element " ++ description))
| ^^^^^^^^^^^^
src/Automata/Internal.hs:261:13: error:
Not in scope: ‘C.replicateM’
Perhaps you meant one of these:
‘C.replicate’ (imported from Data.Primitive.Contiguous),
‘L.replicate’ (imported from Data.List)
Module ‘Data.Primitive.Contiguous’ does not export ‘replicateM’.
|
261 | marr <- C.replicateM (M.size initialCanonization) (error "Automata.Nfsa.minimize: t1 uninitialized element")
| ^^^^^^^^^^^^
src/Automata/Internal.hs:377:12: error:
Not in scope: ‘C.replicateM’
Perhaps you meant one of these:
‘C.replicate’ (imported from Data.Primitive.Contiguous),
‘L.replicate’ (imported from Data.List)
Module ‘Data.Primitive.Contiguous’ does not export ‘replicateM’.
|
377 | m <- C.replicateM (n1 + n2 + 1)
| ^^^^^^^^^^^^
src/Automata/Internal/Transducer.hs:109:15: error:
• Could not deduce (primitive-unlifted-0.1.1.0:Data.Primitive.Unlifted.Class.PrimUnlifted
(SU.Set Int))
arising from the second field of ‘TransitionNfst’
(type ‘DM.Map t (MLN.Map m (SU.Set Int))’)
from the context: (Eq t, Eq m)
bound by the deriving clause for ‘Eq (TransitionNfst t m)’
at src/Automata/Internal/Transducer.hs:109:15-16
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
• When deriving the instance for (Eq (TransitionNfst t m))
|
109 | } deriving (Eq,Show)
| ^^
src/Automata/Internal/Transducer.hs:109:18: error:
• Could not deduce (primitive-unlifted-0.1.1.0:Data.Primitive.Unlifted.Class.PrimUnlifted
(SU.Set Int))
arising from the second field of ‘TransitionNfst’
(type ‘DM.Map t (MLN.Map m (SU.Set Int))’)
from the context: (Bounded t, Enum t, Show t, Show m)
bound by the deriving clause for ‘Show (TransitionNfst t m)’
at src/Automata/Internal/Transducer.hs:109:18-21
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
• When deriving the instance for (Show (TransitionNfst t m))
|
109 | } deriving (Eq,Show)
| ^^^^
will these just have to not be unlifted sets? or does primitive-unlifted
need to provide more instances? i think that once that module compiles, others will also fail, though i could be wrong.
The plural automata
is more consistent with the names of many of packages. For example: containers
, semigroups
, semigroupoids
, etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.